<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>插槽</title>
  </head>
  <body>
    <div id="app">
      <fancy-button>登录</fancy-button>
      <fancy-button>注册</fancy-button>
    </div>

    <template id="fancyButton">
      <button>
        <slot></slot>
      </button>
    </template>
    <script src="../lib/vue.global.js"></script>
    <script>
      Vue.createApp({
        components: {
          FancyButton: {
            template: "#FancyButton",
          },
        },
      }).mount("#app");
    </script>
  </body>
</html>
